﻿@model EquipmentStockLogModel

@Html.ValidationSummary(false)
@Html.HiddenFor(model => model.Id)
@Html.HiddenFor(model => model.EquipmentId)

<script>
    $(document).ready(function () {
        bindBootstrapTabSelectEvent('category-edit');
    });
</script>

<div class="content">
    <div class="form-horizontal">
        <div class="row">
            <div class="col-md-12 clearfix">
                <div class="pull-left">
                    @Html.Action("Mode", "Setting", new { modeName = "category-advanced-mode" })
                </div>
            </div>
        </div>
        <div id="category-edit" class="nav-tabs-custom">
            <ul class="nav nav-tabs">
                @Html.RenderBootstrapTabHeader("tab-info", @T("Admin.Catalog.Categories.Info"), true)
            </ul>
            <div class="tab-content">
                @Html.RenderBootstrapTabContent("tab-info", @TabInfo(), true)
            </div>
        </div>
    </div>
</div>

@{
    //custom tabs
    var eventMessage = new AdminTabStripCreated(this.Html, "category-edit");
    EngineContext.Current.Resolve<IEventPublisher>().Publish(eventMessage);
    foreach (var eventBlock in eventMessage.BlocksToRender)
    {
        @eventBlock
    }
}

@*save selected tab name*@
<input type="hidden" id="selected-tab-name" name="selected-tab-name" value="@(Html.GetSelectedTabName())">

@helper TabInfo()
{
    <div class="panel-group">
        <div class="panel panel-default">
            <div class="panel-body">

                <div class="form-group">
                    <div class="col-md-3">
                        名称
                    </div>
                    <div class="col-md-9">
                        @Html.NopEditorFor(model => model.Name)
                        @Html.ValidationMessageFor(model => model.Name)
                    </div>
                </div>

                <div class="form-group advanced-setting">
                    <div class="col-md-3">
                        品牌
                    </div>
                    <div class="col-md-9">
                        @Html.NopEditorFor(model => model.Manufacturer)
                        @Html.ValidationMessageFor(model => model.Manufacturer)
                    </div>
                </div>

                <div class="form-group advanced-setting">
                    <div class="col-md-3">
                        规格型号
                    </div>
                    <div class="col-md-9">
                        @Html.NopEditorFor(model => model.Specification)
                        @Html.ValidationMessageFor(model => model.Specification)
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-3">
                        单价
                    </div>
                    <div class="col-md-9">
                        @Html.NopEditorFor(model => model.Price)
                        @Html.ValidationMessageFor(model => model.Price)
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-md-3">
                        数量
                    </div>
                    <div class="col-md-9">
                        @Html.NopEditorFor(model => model.Amount)
                        @Html.ValidationMessageFor(model => model.Amount)
                    </div>
                </div>

                <div class="form-group advanced-setting">
                    <div class="col-md-3">
                        备注
                    </div>
                    <div class="col-md-9">
                        @Html.NopEditorFor(model => model.Comment)
                        @Html.ValidationMessageFor(model => model.Comment)
                    </div>
                </div>
            </div>
        </div>
    </div>
}
